Enterprise Objects Framework Release 1.1 Copyright ã1995 by NeXT Computer, Inc.  All Rights Reserved.

EOButtonAssociation 

Inherits From:	EOAssociation : NSObject

Conforms To:	EOAssociationNotification (EOAssociation)

Declared In:	eointerface/EOButtonAssociation.h

Class Description

EOButtonAssociation provides a way to send a message to an enterprise object directly from the user interface. A button association doesn't display anything, but when its button is pressed it sends valuesForKeys: to the first selected object in its controllerÐbut does nothing with the values. Your enterprise object can capitalize on this behavior, and on the default implementation of valuesForKeys:, by implementing a method of the same name as the association's key and whose purpose isn't to return a real value, but to perform some action. By implementing such a method, you allow a button to send a message directly to whatever enterprise object is currently selected.

For example, suppose you have an Employee class that implements a method named takeRaise, which increases the employee's salary by 5%. If you set up a button association with the key ªtakeRaiseº, then whenever the button is pressed the takeRaise method is sent to the first selected employee object, increasing its salary.

Although the interface of any association contains only a few methods, various implementations are often highly dependent on one another and on the way the destination objects act. Because of this, if you need to create an association class for a custom subclass of Button, you should create it as an immediate subclass of EOAssociation.

Instance Variables

None declared in this class.

Instance Methods

None declared in this class.